import { Entity, Column } from 'typeorm';
import { ApiProperty } from '@nestjs/swagger';
import { BaseEntity } from './base.entity';

/**
 * 导航站点实体
 */
@Entity('navigation')
export class NavigationEntity extends BaseEntity {
  @ApiProperty({ description: '站点名称' })
  @Column({ type: 'varchar', length: 100, comment: '站点名称' })
  name: string;

  @ApiProperty({ description: '站点描述' })
  @Column({ type: 'text', nullable: true, comment: '站点描述' })
  description: string;

  @ApiProperty({ description: '站点链接' })
  @Column({ type: 'varchar', length: 500, comment: '站点链接' })
  url: string;

  @ApiProperty({ description: '站点图标路径' })
  @Column({ type: 'varchar', length: 500, nullable: true, comment: '站点图标路径' })
  logo: string;

  @ApiProperty({ description: '排序权重' })
  @Column({ type: 'int', default: 0, comment: '排序权重，数值越大越靠前' })
  sort: number;

  @ApiProperty({ description: '是否启用' })
  @Column({ type: 'boolean', default: true, comment: '是否启用' })
  isActive: boolean;
}